// Copyright [2020] <unknown>
#include <bits/stdc++.h>
using namespace std;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

#define sz(x) ((int)x.size())

typedef long long LL;

LL bin(LL a, LL b, LL p) {
	LL res = 1;
	for (a%=p; b; b>>=1, a=a*a%p)
		if (b & 1)
			res = res * a % p;
	return res;
}

const int N = 1e5+50;

int n, t;
LL l, r;

LL a[N];
int main(int argc, char const *argv[]) {
    // code
    scanf("%d", &t);
    for (int kk=0; kk<t; ++kk) {
    	scanf("%d%lld%lld", &n, &l, &r);
    	--l; --r;
    	a[1] = 0;
    	for (int i=2; i<=n; ++i)
    		a[i] = a[i-1] + (n-i+1) * 2;
    	vector<int> ans;
    	int now = 0;
    	for (int i=1; i<=n; ++i) {
    		if (a[i] <= l)
    			now = i;
    		else
    			break;
    	}
    	dbg(now, a[now]);
    	LL shift = l - a[now];
    	while (ans.size() < (r-l+1) + shift) {
    		if (now == n) {
    			ans.push_back(1);
    			break;
    		}
    		for (int i=now+1; i<=n; ++i) {
    			ans.push_back(now);
    			ans.push_back(i);
    		}
    		++now;
    		
    	}

    	dbg(shift);

    	for (int i=0; i<r-l+1; ++i) {
    		printf("%d%c", ans[i+shift], i==r-l? '\n':' ');
    	}
    }
    return 0;
}